package hDOJ;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main2034_two {
    public static void main(String[] args) {
        Scanner sn = new Scanner(System.in);
        while (sn.hasNext()) {
            int n = sn.nextInt();
            int m = sn.nextInt();
            if (n == 0 && m == 0) {
                continue;
            }
            List<Integer> a = new ArrayList<Integer>();
            List<Integer> b = new ArrayList<Integer>();
            for (int i = 0; i < n; i++) {
                a.add(sn.nextInt());
            }
            for (int j = 0; j < m; j++) {
                b.add(sn.nextInt());
            }
            a.removeAll(b); // 直接去除
            Collections.sort(a);  //默认排序为从小到大
            if (a.isEmpty()) {
                System.out.println("NULL");
                continue;
            }
            for (int i = 0; i < a.size(); i++) {
                System.out.print(a.get(i) + " ");
            }
            System.out.println();
        }
        sn.close();
    }
}
